package com.roc.steelend.util;


import com.roc.steelend.controller.vo.account.AccountSpecialBuyOrderIdDetail;

import java.util.Comparator;

public class BuyOrderByAccountComparator implements Comparator<AccountSpecialBuyOrderIdDetail> {
    @Override
    public int compare(AccountSpecialBuyOrderIdDetail o1, AccountSpecialBuyOrderIdDetail o2) {


        if (o1.getStorageDate().before(o2.getStorageDate())){
            return -1;
        }else if (o1.getStorageDate()==o2.getStorageDate()){
            return 0;
        }else {
            return 1;
        }
    }
}
